<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    ArrayList<String> people = new ArrayList<>();
    people.add(0,"老大");
    people.add(1,"老er");
    people.add(2,"老三");
    people.add(3,"老四");
    people.add(4,"老王");
    request.setAttribute("list",people);
%>
<%--
var，每次遍历出来的变量
items，要遍历的东西
begin,哪里开始
end,哪里结束
step,步长
--%>
<%--当前这个list中进行遍历--%>
<c:forEach var="people" items="${list}">
    <c:out value="${people}"></c:out> <br>
</c:forEach>



</body>
</html>
